package com.example.transit.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.transit.R;
import com.example.transit.bean.HistoryBean;

import java.util.List;

public class HistoryAdapter extends BaseQuickAdapter<HistoryBean,BaseViewHolder>{
    private ImageView history_del_imgv;
    public HistoryAdapter(int layoutResId, @Nullable List<HistoryBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HistoryBean item) {
        history_del_imgv=helper.getView(R.id.history_del_img);
        helper.addOnClickListener(R.id.history_del_img);
        helper.addOnClickListener(R.id.tv_name);
        helper.setText(R.id.tv_name, item.getName());

    }
}
